<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>ES Modules 浏览器环境 Polyfill</title>
  </head>
  <body>
    <script nomodule src="https://unpkg.com/promise-polyfill@8.1.3/dist/polyfill.min.js"></script>
    <script nomodule src="https://unpkg.com/browser-es-module-loader@0.4.1/dist/babel-browser-build.js"></script>
    <script nomodule src="https://unpkg.com/browser-es-module-loader@0.4.1/dist/browser-es-module-loader.js"></script>
    <script nomodule>
      // nomodule:在不支持ES Module的浏览器工作
      alert('hello')
    </script>
    <script type="module">
      import {foo} from './module.js'

      console.log(foo)
    </script>
  </body>
</html>
